<link href="/theme/Admin/css/control/index.css" rel="stylesheet">
<script src="/theme/Default/js/jquery.validate.js"></script>
<script src="/js/ckeditor/ckeditor.js"></script>
<script src="/js/ckeditor/adapters/jquery.js"></script>
<script src="/theme/Admin/js/MenuManage/indexValidate.js"></script>

<form action="/admin/MenuManage/edit/<?php echo $data['id'];?>" method="post" id="categoryAdd">
	<input type="hidden" name="data[id]" value="<?php echo $data['id'];?>" id="data['id']"/>
	<div id="admin-control">
		<div class="admin_control_header">
			Thêm danh mục <span class="admin_control_notice">(Vui lòng điền đầy đủ thông tin)</span>
		</div>
		<div class="admin_control_row">
			<div class="admin_control_label">
				Vị trí Menu :
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<select class="form-control" data-size="8" name="data[menu_category_id]" id="data_category_id">
						<option value="0">Chọn vị trí.........</option>
					    <?php
						    foreach ($menuCat as $item){?>
								<option value="<?php echo $item['menu_categories']['id']?>" 
									<?php echo $data['menu_category_id']==$item['menu_categories']['id']?"selected":"";?>>
									<?php echo $item['menu_categories']['category_name']?></option>
						    
						<?php } ?>
				  	</select>
				</div>
				<div class="category_group_warntip hide"> <!-- Them class "hide" thi se mat di-->
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Bạn chưa chọn danh mục</span>
			    	</div>
				</div>
			</div>
		</div>
		
		<div class="admin_control_row">
			<div class="admin_control_label">
				Thứ tự hiển thị :
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<select class="form-control" data-size="8" name="data[view_index]" id="data_view_index">
					    <?php
					    for ($i = 1; $i <= MAX_SIZE_MENU; $i++) { ?>
								<option value="<?php echo $i;?>"
									<?php echo $data['view_index']==$i?"selected":"" ?>>
									<?php echo $i;?></option>
						<?php } ?>
				  	</select>
				</div>
				<div class="category_group_warntip hide"> 
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Bạn chưa chọn danh mục</span>
			    	</div>
				</div>
			</div>
		</div>
		
		<div class="admin_control_row">
			<div class="admin_control_label">
				Tựa đề :
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<input value="<?php echo $data['name'] ?>" placeholder="Nhập tên danh mục" class="form-control" id="data_name" name="data[name]" type="text" maxlength="50"/>
				</div>
				<div class="category_group_warntip" style="display: none;">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Nhập tên hiển thị</span>
			    	</div>
				</div>
			</div>
		</div>
		
		<div class="admin_control_row">
			<div class="admin_control_label">
				Nội dung :
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<textarea name="data[content]" id="data_content"><?php echo $data['content'];?></textarea>
				</div>
				<div class="category_group_warntip" style="display: none;">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Nhập nội dung của trang</span>
			    	</div>
				</div>
			</div>
		</div>
			
		<div class="admin_control_row">
			<div class="admin_control_label">
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<button type="submit" class="btn btn-danger">Chỉnh sửa</button>
				</div>
			</div>
		</div>
		<div>
			
		</div>
	</div>
</form>